<%--
  Created by IntelliJ IDEA.
  User: 11954
  Date: 2022/4/10
  Time: 9:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>新增学生页</title>
    <style>
        #error {
            font-size: 8px;
            color: red;
        }
    </style>
</head>
<body>
    <form action="addstudent" method="post">
        姓名:<input name="name"><br>
        性别：<input name="sex" type="radio" value="男">男 <input name="sex" type="radio" value="女">女<br>
        年龄:<input name="age"><br>
        <c:if test="${param.status == '1'}">
            <span id="error">输入有误，不能为空！</span><br>
        </c:if>
        <c:if test="${param.status == '2'}">
            <script>alert("添加成功！")</script>
        </c:if>
        <button>添加</button><button type="button" onclick="javascript:location.href='index.jsp'">回首页</button>
    </form>
</body>
</html>
